<?php
    defined('CALLYUMMY_PATH_INCLUDE') or define('CALLYUMMY_PATH_INCLUDE', dirname($_SERVER['DOCUMENT_ROOT']) . '/include');
    defined('CALLYUMMY_PATH_TEMPLATE') or define('CALLYUMMY_PATH_TEMPLATE', dirname($_SERVER['DOCUMENT_ROOT']) . '/template');
    defined('CALLYUMMY_PATH_DATA') or define('CALLYUMMY_PATH_DATA', dirname($_SERVER['DOCUMENT_ROOT']) . '/data');
    require_once(CALLYUMMY_PATH_INCLUDE . '/view/Smarty.php');
    $smarty = new Smarty();
    require_once CALLYUMMY_PATH_INCLUDE . '/common/YCommon_Weixin_Validation.php';
    $validator = new YCommon_Weixin_Validation();
    if ($validator->validation)
    {
        require_once CALLYUMMY_PATH_INCLUDE . '/tool/YTool_Input.php';
        
        $ToUserName = YTool_Input::clean('r', 'ToUserName', 'str');
        $FromUserName = YTool_Input::clean('r', 'FromUserName', 'str');
        $CreateTime = YTool_Input::clean('r', 'CreateTime', 'str');
        $MsgType = YTool_Input::clean('r', 'MsgType', 'str');
        
        require_once CALLYUMMY_PATH_INCLUDE . '/common/YCommon_Weixin_Response.php';
        $response = new YCommon_Weixin_Response();
        $response->doResponse('顺丰550184088317');
        
        $smarty->setTemplateDir(CALLYUMMY_PATH_TEMPLATE);
        $smarty->setCompileDir(CALLYUMMY_PATH_DATA . '/templates_c/');
        $smarty->setConfigDir(CALLYUMMY_PATH_DATA . '/configs/');
        $smarty->setCacheDir(CALLYUMMY_PATH_DATA . '/cache/');
        $smarty->left_delimiter = "{{";
        $smarty->right_delimiter = "}}";
    }
    else
    {
        echo 'invalide access';
        exit(0);
    }
?>
